import { createBrowserRouter, Navigate } from "react-router-dom";
import App from "../App";
import Home from "../views/home/home"
import Login from "../views/login/login";
import Manage from "../views/manage/manage"
const router = createBrowserRouter([
    {
        path: "/",
        element: <App />,
        children: [ // 子路由
            {
                path: "/",
                // 路由重定向, 借助Navigate组件跳转
                element: <Navigate to="login" replace />,
            },
            {
                path: "login",
                element: <Login />,
            }
            , {
                path: "home",
                element: <Home/>,
            },
            , {
                path: "manager",
                element: <Manage/>,
            },
        ],
    },
]);
export default router;
